package com.suliao.home.serviceImpl.supply;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.suliao.home.entity.supply.SupplyPictureDO;
import com.suliao.home.mapper.supply.SupplyPictureMapper;
import com.suliao.home.service.supply.SupplyPictureService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author： M1nG-CodeGenerator
 * @since： 2020-12-17 17:25:40
 * @description： 图文描述 服务实现类
 * @version： 1.0
 */
@Service
public class SupplyPictureServiceImpl extends ServiceImpl<SupplyPictureMapper, SupplyPictureDO> implements SupplyPictureService {

    @Autowired
    private SupplyPictureMapper supplyPictureMapper;


    /**
     * 根据产品id去查询相应的图文描述信息
     * @param productId
     * @return
     */
    @Override
    public List<SupplyPictureDO> getPictureListByProductId(Integer productId) {
        return supplyPictureMapper.getPictureListByProductId(productId);
    }

    /**
     * 通过公司id查询展厅产品信息
     * @param companyId
     * @return
     */
    @Override
    public List<SupplyPictureDO> loadProductByCompanyId(Integer companyId) {
        return supplyPictureMapper.loadProductByCompanyId(companyId);
    }

    /**
     * 通过公司id 查询展品信息
     * @param page
     * @param companyId
     * @return
     */
    @Override
    public Page<SupplyPictureDO> loadPageProductByCompanyId(Page page, Integer companyId) {
        return supplyPictureMapper.loadPageProductByCompanyId(page,companyId);
    }

    /**
     * 通过公司id和展品分类id查询展品信息
     * @param page
     * @param companyId
     * @param exhibitTypeId
     * @return
     */
    @Override
    public Page<SupplyPictureDO> loadPageProductByCompanyIdAndExhibitTypeId(Page page, Integer companyId, Integer exhibitTypeId) {
        return supplyPictureMapper.loadPageProductByCompanyIdAndExhibitTypeId(page,companyId,exhibitTypeId);
    }
}
